-- stone_prop
-- created by zhuangsl
-- 魔法石柱附加状态

return {
    fetchProps = function(who, status, condition)
        local props = {};
        local endRound = condition["end_round"];

        -- 诅咒
        local propId = PropM.getPropId("curse");
        local value  = tonumber(condition["curse"]);
        if value > 0 then
            table.insert(props, { propId, 1, value, endRound, });
        end

        -- 禁魔
        propId = PropM.getPropId("forbidden_magic");
        value  = tonumber(condition["forbid_magic"]);
        if value > 0 then
            table.insert(props, { propId, "stone", value, endRound, });
        end

        return props;
    end,

    desc = function(who, status, condition)
        -- 获取状态描述
        local cfg = CombatStatusM.getStatusInfo(status);
        local desc = cfg.desc;

        -- 诅咒
        local propId = PropM.getPropId("curse");
        local value  = tonumber(condition["curse"]);
        if value > 0 then
            value = math.modf(value / 10);
            desc = string.gsub(desc, "{curse}", value);
        end

        return desc;
    end,
};
